package com.geek.javase.ch02.test4;

/*
 *@author wangpeng
 *2025/10/10 13:27
 *@description TODO
 */
public class Employee {
    // 基本属性
    private String name;
    private String address;
    private double baseSalary;

    // 无参构造方法
    public Employee() {
    }

    // 有参构造方法
    public Employee(String name, String address, double baseSalary) {
        this.name = name;
        this.address = address;
        this.baseSalary = baseSalary;
    }

    // getter和setter方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public double getBaseSalary() {
        return baseSalary;
    }

    public void setBaseSalary(double baseSalary) {
        this.baseSalary = baseSalary;
    }

    // 显示基本信息的方法
    public void show() {
        System.out.println("员工姓名: " + this.name + ", 地址: " + this.address + ", 基本工资: " + this.baseSalary);
    }
}

